home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / ck5a189s / ckucmd.h < prev    next >
C/C++ Source or Header  |  1993-06-04  |  4KB  |  132 lines

  1. /*  C K U C M D . H  --  Header file for Unix cmd package  */
  2.  
  3. /*
  4.   Author: Frank da Cruz (fdc@columbia.edu, FDCCU@CUVMA.BITNET),
  5.   Columbia University Academic Information Systems, New York City.
  6.  
  7.   Copyright (C) 1985, 1993, Trustees of Columbia University in the City of New
  8.   York.  The C-Kermit software may not be, in whole or in part, licensed or
  9.   sold for profit as a software product itself, nor may it be included in or
  10.   distributed with commercial products or otherwise distributed by commercial
  11.   concerns to their clients or customers without written permission of the
  12.   Office of Kermit Development and Distribution, Columbia University.  This
  13.   copyright notice must not be removed, altered, or obscured.
  14. */
  15.  
  16. #ifndef CKUCMD_H
  17. #define CKUCMD_H
  18.  
  19. /* Special getchars... */
  20.  
  21. #ifdef DYNAMIC                /* Dynamic command buffers */
  22. #define DCMDBUF
  23. /*
  24.   Use malloc() to allocate the many command-related buffers in ckucmd.c.
  25. */
  26. #endif /* DYNAMIC */
  27.  
  28. #ifdef VMS
  29. #ifdef getchar                /* This is for VMS GCC */
  30. #undef getchar
  31. #endif /* getchar */
  32. #define getchar()   vms_getchar()
  33. #endif /* VMS */
  34.  
  35. #ifdef aegis
  36. #undef getchar
  37. #define getchar()   coninc(0)
  38. #endif /* aegis */
  39.  
  40. #ifdef AMIGA
  41. #undef getchar
  42. #define getchar() coninc(0)
  43. #endif /* AMIGA */
  44.  
  45. /* Sizes of things */
  46.  
  47. #ifndef CMDDEP
  48. #define CMDDEP  20            /* Maximum command recursion depth */
  49. #endif /* CMDDEP */
  50. #define HLPLW   78            /* Width of ?-help line */
  51. #define HLPCW   19            /* Width of ?-help column */
  52. #define HLPBL  100            /* Help string buffer length */
  53. #define ATMBL  256            /* Command atom buffer length*/
  54. #ifdef NOSPL
  55. /* No script programming language, save some space */
  56. #define CMDBL 512            /* Command buffer length */
  57. #else
  58. #define CMDBL 1024            /* Command buffer length */
  59. #endif /* NOSPL */
  60.  
  61. /* Special characters */
  62.  
  63. #define RDIS 0022            /* Redisplay   (^R) */
  64. #define LDEL 0025            /* Delete line (^U) */
  65. #define WDEL 0027            /* Delete word (^W) */
  66.  
  67. /* Keyword table flags */
  68.  
  69. #define CM_INV 1            /* Invisible keyword */
  70. #define CM_ABR 2            /* Abbreviation */
  71.  
  72. /* Token flags */
  73.  
  74. #define CMT_COM 0            /* Comment (; or #) */
  75. #define CMT_SHE 1            /* Shell escape (!) */
  76. #define CMT_LBL 2            /* Label (:) */
  77. #define CMT_FIL 3            /* Indirect filespec (@) */
  78.  
  79. /* Keyword Table Template */
  80.  
  81. struct keytab {                /* Keyword table */
  82.     char *kwd;                /* Pointer to keyword string */
  83.     int kwval;                /* Associated value */
  84.     int flgs;                /* Flags (as defined above) */
  85. };
  86.  
  87. /* Function prototypes */
  88.  
  89. #ifdef CK_ANSIC                /* ANSI C */
  90. #ifdef M_SYSV                /* SCO Microsoft C wants no args */
  91. typedef int (*xx_strp)();
  92. #else
  93. typedef int (*xx_strp)(char *, char **, int *);
  94. #endif /* M_SYSV */
  95. #else                    /* Not ANSI C */
  96. typedef int (*xx_strp)();
  97. #endif /* CK_ANSIC */
  98.  
  99. _PROTOTYP( int xxesc, (char **) );
  100. _PROTOTYP( VOID cmsetp, (char *) );
  101. _PROTOTYP( VOID cmsavp, (char [], int) );
  102. _PROTOTYP( VOID prompt, (xx_strp) );
  103. _PROTOTYP( VOID pushcmd, (void) );
  104. _PROTOTYP( VOID cmres, (void) );
  105. _PROTOTYP( VOID cmini, (int) );
  106. _PROTOTYP( int cmpush, (void) );
  107. _PROTOTYP( int cmpop, (void) );
  108. _PROTOTYP( VOID untab, (char *) );
  109. _PROTOTYP( int cmnum, (char *, char *, int, int *, xx_strp ) );
  110. _PROTOTYP( int cmofi, (char *, char *, char **, xx_strp ) );
  111. _PROTOTYP( int cmifi, (char *, char *, char **, int *, xx_strp ) );
  112. _PROTOTYP( int cmdir, (char *, char *, char **, xx_strp ) );
  113. _PROTOTYP( int cmfld, (char *, char *, char **, xx_strp ) );
  114. _PROTOTYP( int cmtxt, (char *, char *, char **, xx_strp ) );
  115. _PROTOTYP( int cmkey, (struct keytab [], int, char *, char *, xx_strp) );
  116. _PROTOTYP( int cmkey2,(struct keytab [], int, char *, char *, char *,xx_strp));
  117. _PROTOTYP( int chktok, (char *) );
  118. _PROTOTYP( int cmcfm, (void) );
  119. _PROTOTYP( int rdigits, (char *) );
  120. _PROTOTYP( int chknum, (char *) );
  121. _PROTOTYP( int lower, (char *) );
  122. _PROTOTYP( int lookup, (struct keytab [], char *, int, int *) );
  123. _PROTOTYP( int ungword, (void) );
  124.  
  125. #ifdef DCMDBUF
  126. _PROTOTYP( int cmsetup, (void) );
  127. #endif /* DCMDBUF */
  128.  
  129. #endif /* CKUCMD_H */
  130.  
  131. /* End of ckucmd.h */
  132.